package regexDemo;

public class RegexDemo2 {
    public static void main(String[] args) {
        String regex1="[1-9]\\d{16}(\\d|(?i)x)";
        System.out.println("256154855223651254".matches(regex1));


        System.out.println("--------------------------");
        String regex2="[1-9]\\d{5}(18|19|20)\\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\\d|3[01])\\d{3}[\\d|(?i)x]";
        System.out.println("13054219230506256x".matches(regex2));





    }
}
